package com.turtle3d.gui.fractaloptions;

import javax.swing.DefaultComboBoxModel;

import com.turtle3d.ResourceManager;
import com.turtle3d.formallanguage.grammar.Grammar;
import com.turtle3d.visualizator.Visualizator;

public class ResourceComboBoxModel extends DefaultComboBoxModel
{
	
	public static final int GRAMMARS=1, VISUALIZATORS=2;

	public ResourceComboBoxModel(int resource)
	{
		
		switch(resource){
			case GRAMMARS:{
				for (Grammar g : ResourceManager.getGrammars())
				{
					addElement(new ObjectWrapper(g));
				}
				break;
			}
			case VISUALIZATORS:{
				for (Visualizator v : ResourceManager.getVisualizators())
				{
					addElement(new ObjectWrapper(v));
				}
				break;
			}
			default: break;
			
		}
	

	}

}
